With the appearance of a self-moving device such as a window-wiping robot, the work like wiping a window becomes simpler. How to wipe the window more efficiently becomes a development trend of the window-wiping robot, and apparently, the window-wiping efficiency of the window-wiping robot is improved if the window-wiping robot can rotate in situ at a side or corner of the window directly. Therefore, an engagement mechanism is necessary to facilitate a rotation in situ of the window-wiping robot and at the same time to also enable the window-wiping robot to be positioned according to a setting position after the rotation. Specifically, the window-wiping robot generally comprises a machine body and an outer frame, wherein the machine body is in a circular shape and has a movement function, and the outer frame is in a square shape and has a function of wiping the window. There are two connection states between the machine body and the outer frame, i.e., separation or engagement. When in a separation state, the machine body may rotate with respect to the outer frame; and when in an engagement state, the machine body is fixed with respect to the outer frame, and the outer frame can only rotate with the machine body together but they cannot rotate relatively. However, when such an engagement mechanism is employed in practice, the robot cannot work normally because the engagement mechanism is unable to be engaged in place due to a tiny deviation during rotation.